<!DOCTYPE html>
<html lang="ko">
<head>
	<meta charset="UTF-8">
	<title>Numbers</title>
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<!-- Bootstrap -->
	<link href="../css/bootstrap.min.css" rel="stylesheet" media="screen">
</head>
<body>
	<?php # Script 1.8 - numbers.php
	
	// Set the variables:
	$quantity = 30; // Buying 30 widgets.
	$price = 199.95;
	$taxrate = .05; // 5% sales tax.

	// Calculate the total:
	$total = $quantity * $price;
	$total = $total + ($total * $taxrate); // Calculate and add the tax.

	// Format the total:
	$total = number_format($total, 2);

	// Print the results:
	echo '<h4>You are purchasing <b>'.$quantity.'</b> widget(s) at a cost of <b>$'.$price.'</b> each. With tax, the total comes to <b>$'.$total.'</b>.</h4>';

	?>
	<script src="http://code.jquery.com/jquery.js"></script>
	<script src="../js/bootstrap.min.js"></script>
</body>
</html>